package com.qf.feign;

import com.qf.config.ServerConfig;
import com.qf.feign.factory.CustomerFeignFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * 远程调用
 * @author lixu
 */
@FeignClient(name =
        ServerConfig.CUSTOMER,
        path = ServerConfig.ServerCustomerCommonPath.CUSTOMER,
        fallbackFactory = CustomerFeignFactory.class)//远程调用  不适合浏览器  Http请求
public interface CustomerFeign {

    /**
     * 被调用的方法
     */
    @GetMapping("/list")
    public String list(Integer id);


    /**
     * 关联
     * @return
     */
    @GetMapping("/a")
    public String a();
}
